home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c,comp.os.os2.programmer.misc
- Subject: Re: redefining stdout and stderr
- Date: Tue, 09 Jan 96 15:48:28 GMT
- Organization: none
- Message-ID: <821202508snz@genesis.demon.co.uk>
- References: <DKw9Cv.2x4@fyi.net>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <DKw9Cv.2x4@fyi.net> fireresq@fyi.net writes:
-
- >I need to change the assocation of stdout and stderr programaticly. I
- >would be open for suggestions.
-
- The standard C way of doing this is freopen() e.g.
-
- #include <stdio.h>
-
- if (freopen(filename, "w", stdout) == NULL) {
- /* Open failed */
- }
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-